<?php


namespace app\common\lib;
use think\Controller;
use think\Db;

class Commonsql extends Controller
{
    /**
     * @param $tid
     * @param $status
     * @return array $data 名师
     */
    public function get_teacher_msg($tid,$status)
    {
        $_sql = "SELECT bd_teacher.id,bd_teacher.name,bd_teacher.face,bd_teacher.tip,bd_teacher.introduce,bd_teacher.status,bd_teacher_title.t_name,bd_major.m_name
                        FROM bd_teacher,bd_teacher_title,bd_major 
                            WHERE bd_teacher.title = bd_teacher_title.id
                                AND bd_teacher.major = bd_major.id
                                    AND bd_teacher.status = $status
                                        AND bd_teacher.id = $tid";
        $ret = Db::query($_sql);
        return $ret;
    }
}